import http from 'utilMethods/http'

const request = 'http://report.wsn2019.club/group_asset'

const group_asset = {
  getAssetsByGroupId(groupId) {
    return http.get(`${request}/` + groupId)
  },

  postApplyForAsset(params) {
    return http.post(`${request}/create`, params)
  },

  getApplyListByGroupId(groupId) {
    return http.get(`${request}/getGroupAsset/` + groupId)
  },

  getAssetsOfUser(groupId) {
    return http.get(`${request}/getUserAsset/` + groupId )
  },

  getReturnAssets(params) {
    return http.get(`${request}/return`, params)
  },

  getTransferAssets(assetId,receiverId ) {
    return http.get(`${request}/transfer/` + assetId +`/` + receiverId  )
  },

  postUpdateAssetInfo(params) {
    return http.post(`${request}/update`, params)
  },
}

export default group_asset
